﻿using Autofac.Extras.DynamicProxy;
using Wenyu.Framework.AutofacAOP.AOPExtend;
using Wenyu.Framework.DbModels;
using Wenyu.Framework.IBusinessServices;

namespace Wenyu.Framework.BusinessServices
{
    [Intercept(typeof(CustomLogInterceptor))]  //nuget:Autofac.Extras.DynamicProxy
    public class TestService :ITestService
    {
        public TestService(FrameworkDbContext context)
        {
        }

        //非virtual的无法进入Aop代理
        public void ShowName()
        {
            
        }
        //virtual的能有Aop代理
        public virtual void ShowAndName()
        {

        }
    }
}